//
// Created by 86176 on 2021/11/24.
//

#ifndef CHENYUENEW_TAILFILTERCHAIN_H
#define CHENYUENEW_TAILFILTERCHAIN_H


#include "FilterChain.h"
#include "IoHandler.h"

#include <utility>

class TailFilterChain: public FilterChain {
private:
    IoHandler *ioHandler;
public:
    explicit TailFilterChain(std::string str):FilterChain(std::move(str)){ ioHandler = nullptr;}

    void setIOHander(IoHandler *ioHandler1){ioHandler = ioHandler1;}

    IoHandler *getIoHandler() const;

    void PostMessageToIOHander(Session* session, Message *pMessage);

    bool getMessage(Session *pSession,IoBuffer* ioBuffer, Message *pMessage) override;
};


#endif //CHENYUENEW_TAILFILTERCHAIN_H
